package com.tema2.Lab4.Ex2;

public class Sequence2 {
	final Integer SEQUENCE_COUNT = 10;
	private Integer firstNumber;
	private Integer secondNumber;
	private Integer nextNumber;
public Sequence2(){
	this.firstNumber=0;
	this.secondNumber=1;
}
/**
 * Metodo encargado de mostrar la secuencia
 * 
 */
	public void displaySequence() {
		System.out.println(firstNumber.toString());
		System.out.println(secondNumber.toString());
		nextNumber = firstNumber + secondNumber;
		for(int i=3;i<=SEQUENCE_COUNT;i++){
			System.out.println(nextNumber);
			firstNumber=secondNumber;
			secondNumber=nextNumber;
			nextNumber=firstNumber+secondNumber;
		}

	}
}
